<html>
<head>
  <title>SWG Skeletal Mesh (.mgn) file format.</title>
  <style type="text/css">
  </style>
</head>
<body style="background-color:white" >
<hl style="color:black; font-size:25px">SWG Skeletal Mesh (.mgn) format</hl></br>
<hl style="color:black; font-size:15px">by <a href="index.html">Xunil</a></hl></br>
<p style="color:back">
<ul>
<li> This file, like most SWG files, is based on the <a href="iff_format.html">IFF</a> format.</li>
<li> This overview will skip going into detail about the IFF format in general
and focus purely on the organization of the Skeletal Mesh form.</li>
<li>If a Form/Record appears multiple times I will only define it the
first time, unless its structure differs.</li>
<li>This file format is still being explored, so take this information as
a guide and realize that some assumptions made here may be incorrect
or missing details.</li>
<li>If you discover something I missed or have an error correction,
  please send a message Xunil on the <a href="http://www.swgemu.com/forums">swgemu forums.</a></li>
<li><b>NOTE:</b> All values are little-endian, unless otherwise noted.</li>
</ul>


<ul>
  <li>Form:SKMG</li>
  <ul>
    <li>Form:000# <i>(The # is an ASCII numerical character, not sure
	of the meaning for this form.)</i></li>
    <ul>
      <li>Record: INFO <i></i>
	<ul>
	  <li>Unknown 1 - 32-bit unsigned int</li>
	  <li>Unknown 2 - 32-bit unsigned int</li>
	  <li>Number of skeletons - 32-bit unsigned int</li>
	  <li>Number of bones - 32-bit unsigned int</li>
	  <li>Number of vertices - 32-bit unsigned int</li>
	  <li>Number of bone weights - 32-bit unsigned int</li>
	  <li>Number of normals - 32-bit unsigned int</li>
	  <li>Unknown 8 - 32-bit unsigned int</li>
	  <li>Number of blend tables - 32-bit unsigned int</li>
	  <li>Number of FOZC - 16-bit unsigned int</li>
	  <li>Unknown 11 - 16-bit int</li>
	  <li>Unknown 12 - 16-bit int</li>
	  <li>Unknown 13 - 16-bit int</li>
	</ul>
      </li>
      <li>Record: SKTM
	<ul>
	  <li>Skeleton Filename - NULL terminated ascii string. <i>(
	  x Number of Skeletons)</i></li>
	</ul>
      </li>
      <li>Form: PSDT
	<ul>
	  <li>Form: TCSF
	    <ul>
	      <li>Record: TCSD
		<ul>
		  <li>Texture coordinates - Two 32-bit float.</li>
		</ul>
	      </li>
	    </ul>
	  </li>
	  <li>Form: PRIM
	    <ul>
	      <li>Record: INFO
		<ul>
		  <li>Unknown - 32-bit unsigned int.</li>
		</ul>
	      </li>
	      <li>Record: ITL
		<ul>
		  <li>Number - 32-bit unsigned int.</li>
		  <li>Triangle(indices into PIDX array) - Three 32-bit unsigned int.</li>
		</ul>
	      </li>
	      <li>Record: OITL</li>
	    </ul>
	  </li>
	  <li>Record: NAME</li>
	  <li>Record: PIDX</li>
	  <li>Record: NIDX</li>
	  <li>Record: VDCL</li>
	  <li>Record: TXCI</li>
	  <li>Record: DOT3</li>
	</ul>
      </li>
      <li>Form: BLTS
	<ul>
	  <li>Form: BLT
	    <ul>
	      <li>INFO</li>
	      <li>POSN</li>
	      <li>NORM</li>
	      <li>DOT3</li>
	    </ul>
	  </li>
	</ul>
      </li>
      <li>Form: HPTS</li>
      <li>Form: TRTS</li>
      <li>Record: XFNM</li>
      <li>Record: POSN</li>
      <li>Record: TWHD</li>
      <li>Record: TWDT</li>
      <li>Record: NORM</li>
      <li>Record: DOT3</li>
      <li>Record: OZN</li>
      <li>Record: FOZC</li>
      <li>Record: OZC</li>
      <li>Record: ZTO</li>
    </ul>
  </ul>
</ul>

</body>
</html>
